<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/common.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>	
	<script src="<%=contextPath %>/js/validator.js"></script>
	<script language="javascript" src="<%=contextPath%>/js/func.js"type=""></script>
	<script type="text/javascript" src="<%=contextPath%>/js/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="<%=contextPath%>/js/advanceSearch.js"></script>
   <link rel="stylesheet" href="<%=contextPath%>/ext3/resources/css/ext-all.css" type="text/css"   />
    <script src="<%=contextPath%>/ext3/adapter/ext/ext-base.js"></script>
    <script src="<%=contextPath%>/ext3/ext-all.js"></script>
	<link href="<%=contextPath%>/css/search_v3.css" rel="stylesheet" type="text/css" />
	<link href="<%=contextPath%>/css/common.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	Ext.onReady(function(){
		var tb = new Ext.Toolbar({
		    renderTo: Ext.get('tbar'),
		    items: ['',
		        {
		            text: '查询',
		             icon:"<%=contextPath%>/" + "images/query.gif",
		             handler:cmt
		        },
		        
		        {
		            text: '审核',
		            icon:"<%=contextPath%>/" + "images/editlink.gif",
		            handler:option
		            
		        } 
		          
		    ]
		});
	});
	</script>
   <script>
   	  
			function add(){
			//newPlanFormWin.show();
				//window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id=0";
			}		
			// 新建修改进入详细页面
			function toDetail(){
				 if(!isChecked("id")){
						alert("请选择项目！");
						return false;
					}
					
					    //获得id
				   window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id="+checkedid;
			}
			// 查看详细页面
			function toInfo(id){
				   window.location.href = "<%=contextPath%>/jsp/education/itemmanager/mainProjectDeclar.jsp?id="+id;
			}
				//人员评价
			function option(){
				if(!isChecked("id")){
					alert("请选择项目！");
					return false;
				}
				 getCheckValue("id");//获取id值
			 	if(confirm("确定要要将计划提交吗？")) {
				
				document.frmM.action = "<%=contextPath%>/plan!submit.do?state=2";
				document.frmM.submit();
				}
			}
					 
			// 查询
			function cmt() {
				document.frmM.action = "<%=contextPath%>/planList!getList.do?page=1&c=c";
				document.frmM.submit();
			}

			// 删除
			function deleteIt(){
				if(!isChecked("id")) {
		 			alert("请选择要删除的记录");
		 			return false;
		 		}
		    	if(confirm("确定要删除选中的记录吗？")) {
		        	document.frmM.action = "<%=contextPath%>/projectDeclaration!delete.do";
					document.frmM.submit();
		    	}
			}
		 
					
					
			</script>
	
	
  </head>
  
  <body>
 <body>
  <div id ='tbar'></div>
		<form id="frmM" class="ct" name="frmM" method="POST" action="<%=contextPath%>/queryUser.do">
			 <input type="hidden" name="searchBean.displayFlag" value="${searchBean.displayFlag}"/>
			 <input type="hidden" name="searchBean.con8" id="searchBean.con8" value="${searchBean.con8}" >
			<input type="hidden" name="conditionHtml" />
			<table width="100%" id="contab" >
				<tr>
					<th >开始时间：</th >
					<td  align="left" >
					<input type="text"  onclick="WdatePicker({el:$dp.$('searchBean.con1')})" name="searchBean.con1" id="searchBean.con1" value=${searchBean.con1 }>
					</td>
					<th >结束时间：</th >
					<td  align="left" >
					<input type="text"  onclick="WdatePicker({el:$dp.$('searchBean.con2')})"  name="searchBean.con2" id="searchBean.con2" value=${searchBean.con2 }>
					</td>
				</tr>
				<tr>
					<th >班组</th >
					<td  align="left">
					<input type="text" name="searchBean.con3" id="searchBean.con3" value="${searchBean.con3}" >
					</td>
					<th >变电站：</th >
					<td  align="left" >
					 <s:select  id="searchBean.con4"  name="searchBean.con4" list="#{'':'全部','10kV':'10kV
','35kV':'35kV','110kV':'110kV','220kV':'220kV'}" listKey="key" listValue="value" />
					</td>
		</tr>
			</table>
		<hr>
		<table width="100%" id="listtab">
    		<tr>
    			<th width="10%">
	           <input name="chkAll" type="checkbox" id="chkAll"
				onclick="javascript:checkAll(this.form, 'id');" value="checkbox">全选
				</th>
				<th class="ct">开始时间</th>
				<th class="ct" >结束时间</th>
				<th class="ct" >班组</th>
				<th class="ct" >变电站</th>
				<th class="ct" >停电范围</th>
				<th class="ct" >电压等级</th>
				<th class="ct" >工作项目</th>
				
			</tr>
			<c:forEach items="${list}" var="Tab" >
					<tr>
						<td >
							<input type="checkbox" name="id" id = "id" value="${Tab.id}" />
						<br></td>
						<td>
						<c:if test="${empty Tab.startdate}">&nbsp;</c:if>
						<c:if test="${!empty Tab.startdate}"><fmt:formatDate value="${Tab.startdate}" pattern="yyyy-MM-dd"/></c:if>
						 </td>
						<td><c:if test="${empty Tab.enddate}">&nbsp;</c:if>
							<c:if test="${!empty Tab.enddate}"><fmt:formatDate value="${Tab.enddate}" pattern="yyyy-MM-dd"/></c:if></td>
						<td>${Tab['teamnames']}</td>
						<td>${Tab['stationname']}</td>
						<td>${Tab['powerrange']}</td>
						<td>${Tab['voltagelevel']}</td>
						<td>${Tab['workcontent']}</td>
					</tr>
				</c:forEach>

				<c:if test="${list == null || fn:length(list) == 0 }">
					<tr>
						<td colspan="9" style="text-align: center">
							无相关记录
						</td>
					</tr>
				</c:if>
		</table>
			<table width="100%" id="tablestyle2">
			<tr>
				<td>
					<hr />
				</td>
			</tr>
			<tr>
				<td>${pageDown}</td>
			</tr>
		</table>
	</form>
  </body>
</html>
